// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 钱包账户信息修改 钱包账户信息修改 PUT /api/account */
export async function putAccount(
  params: {
    // path
  },
  body: API.ModelsAccountPut,
  options?: { [key: string]: any },
) {
  const { ...queryParams } = params;
  return request<API.ModelsAccountResponse>('/api/account', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 钱包账户信息创建 钱包账户信息创建 POST /api/account */
export async function postAccount(
  params: {
    // path
  },
  body: API.ModelsAccountPost,
  options?: { [key: string]: any },
) {
  const { ...queryParams } = params;
  return request<API.ModelsAccountResponse>('/api/account', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 钱包账户信息获取 钱包账户信息获取 GET /api/account/${param0} */
export async function getAccount(
  params: {
    // path
    address: string;
  },
  options?: { [key: string]: any },
) {
  const { address: param0, ...queryParams } = params;
  return request<API.ModelsAccountResponse>(`/api/account/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
